home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_shs_spiderdrop.cog < prev    next >
Text File  |  1999-11-15  |  1KB  |  71 lines

  1. # Jones 3D Cog Script
  2. #
  3. # shs_SpiderDrop.cog
  4. #
  5. # [GGJ] && [TRM]
  6. #
  7. # [JWC] added triggered by walking
  8. #
  9. # (C) 1999 LucasArts Entertainment Company LLC. All Rights Reserved
  10. #
  11. # ========================================================================================
  12. symbols
  13.  
  14.     message     killed
  15.     message        startup
  16.     message     entered
  17.  
  18.     surface        trig_Spider
  19.     
  20.     thing        spiderGhost0
  21.     thing        spider0            local
  22.     thing        player            local
  23.  
  24.     template    tpl_Spider=spider_wall        local
  25.     
  26.     int            population=0    local
  27.  
  28. end
  29.  
  30. # ========================================================================================
  31.  
  32. code
  33.  
  34. startup:
  35.  
  36.     spider0 = -1;
  37.     population = 0;
  38.     player = GetLocalPlayerThing();
  39.     PrintInt(population);
  40.     return;
  41.  
  42.  
  43.  
  44. entered:
  45.  
  46.     if ((spider0 != -1) || (population != 0))
  47.         return;
  48.     
  49.     if ((GetSenderRef() == trig_Spider) && (GetSourceRef() == player))
  50.     {
  51.         population = 1;
  52.         Sleep(0.75);
  53.         spider0 = CreateThing(tpl_Spider, spiderGhost0);
  54.     
  55.         CaptureThing(spider0);
  56.     }
  57.     return;
  58.  
  59. # ========================================================================================
  60.  
  61. killed:
  62.     
  63.     spider0 = -1;
  64.     population = 0;
  65.     return;
  66.     
  67. # ========================================================================================
  68. end
  69.  
  70.  
  71.